package gameStructure;

import java.util.Random;

public class playersChoice{
    /**
     * I metavlites autes tha pernoun mesa to String tou 
     * ekastote onomatos analoga me to hroma pou ehoun epilexi
     */ 
    public String w;
    public String b;
    
    /**
     * 
     * @param clr To hroma pou ehi epilexi o pektis.
     * @param name To onoma tou pekti.
     */
    public playersChoice(char clr, String [] name){
        if ( Character.toLowerCase(clr) =='w'){
            w = new String(name[0]);
            b = new String(name[1]);
        }
        else if (Character.toLowerCase(clr) =='b'){
            w = new String(name[1]);
            b = new String(name[0]);
        }
        else{
            Random rand = new Random();
            int i = rand.nextInt(1);
            w = new String(name[i]);
            b = new String(name[((i==1)? 0 : 1)]);
        }
    }
}